package com.expert.common.page;

import com.baomidou.mybatisplus.plugins.Page;

/**
 * @描述: 基于MyBatis-Plus的分页封装，主要是用于缓存上
 * @作者: Pengo.Wen
 * @日期: 2017-03-31 16:16
 * @版本: v1.0
 */
public class MyPage<T> extends Page<T> {


    public MyPage(int current, int size) {
        super(current, size);
    }

    public MyPage(int current, int size, String orderByField) {
        super(current, size);
        this.setOrderByField(orderByField);
    }

    public String getKey(){
        return this.getCurrent() + "_" + this.getSize() + "_" + this.getOrderByField() + "_" + this.isAsc();
    }

}
